{extend name="iframe" /}

{block name="body"}
<div class="layui-fluid">
	<div class="layui-row layui-col-space15">
		<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list">
			<form action="{:request()->url()}" method="post" class="xn_ajax" data-type="open">
				<div class="layui-form-item">
					<label class="layui-form-label">产品</label>
					<div class="layui-input-block">
						<input type="text" lay-verify="" autocomplete="off" class="layui-input" value="	{$data.name}" readonly="readonly">

					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">图片</label>
					<div class="layui-input-block">
						<img src="{$data.image}" alt="" style="width:100px;height:150px;">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">图集</label>
					<div class="layui-input-block">
						<div class="layui-carousel" id="ID-carousel-demo-image">
							<div carousel-item>
								{foreach $data['images'] as $k=>$v}
								<div><img src="{$v}" style="width:100px;height:150px;"></div>
								{/foreach}

							</div>
						</div>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">是否首页</label>
					<div class="layui-input-block">
						<input type="radio" name="home" value="0" title="否" {if condition="$data['home'] eq '0'"
							}checked{/if}>
						<input type="radio" name="home" value="1" title="是" {if condition="$data['home'] eq '1'"
							}checked{/if}>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">发货</label>
					<div class="layui-input-block">
						<input type="text" name="delivery" lay-verify="" placeholder="请输入发货" autocomplete="off"
							class="layui-input" value="{$data.delivery}">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">限制距离</label>
					<div class="layui-input-block">
						<input type="number" name="mapdist" lay-verify="" placeholder="请输入限制距离/KM" autocomplete="off"
							class="layui-input" value="{$data.mapdist}"> 
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">共享数量</label>
					<div class="layui-input-block">
						<input type="text" name="quantity" lay-verify="" placeholder="请输入共享数量" autocomplete="off"
							class="layui-input" value="{$data.quantity}">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">押金</label>
					<div class="layui-input-block">
						<input type="number" name="deposit" lay-verify="" placeholder="请输入押金" autocomplete="off"
							class="layui-input" value="{$data.deposit}">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">价格</label>
					<div class="layui-input-block">
						<input type="number" name="price" lay-verify="" placeholder="请输入价格" autocomplete="off"
							class="layui-input" value="{$data.price}">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">状态</label>
					<div class="layui-input-block">
						<input type="radio" name="status" value="1" title="上架" {if condition="$data['status'] eq '1'"
							}checked{/if}>
						<input type="radio" name="status" value="2" title="下架" {if condition="$data['status'] eq '2'"
							}checked{/if}>
					</div>
				</div>

				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="submit" lay-submit class="layui-btn">保存</button>
						<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<style>
	.layui-carousel-arrow {
		display: none !important;
	}
</style>
{/block}

{block name="js"}
<!--编辑器-->
<script src="/static/admin/ueditor/ueditor.config.js"></script>
<script src="/static/admin/ueditor/ueditor.all.min.js"></script>
<script src="/static/admin/ueditor/lang/zh-cn/zh-cn.js"></script>
<script>
	layui.use(function() {
		var carousel = layui.carousel;
		// 渲染 - 图片轮播
		carousel.render({
			elem: '#ID-carousel-demo-image',
			width: '100px',
			height: '150px',
			autoplay: false
		});
	});
</script>
{/block}